package shopping.mode;

import java.util.List;

/**
 * 订单
 */
public class Order {
    private String orderId;
    private String orderNum;
    private String orderCreated;
    private String userId;
    /**
     * 原总价
     */
    private double totalPrice;
    /**
     * 优惠总价
     */
    private double discountPrice;

    private List<OrderItem> orderItems;
    private Address address;

    public Order() {
    }

    public Order(String orderId, String orderNum, String orderCreated, String userId, double totalPrice, double discountPrice, List<OrderItem> orderItems, Address address) {
        this.orderId = orderId;
        this.orderNum = orderNum;
        this.orderCreated = orderCreated;
        this.userId = userId;
        this.totalPrice = totalPrice;
        this.discountPrice = discountPrice;
        this.orderItems = orderItems;
        this.address = address;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(String orderNum) {
        this.orderNum = orderNum;
    }

    public String getOrderCreated() {
        return orderCreated;
    }

    public void setOrderCreated(String orderCreated) {
        this.orderCreated = orderCreated;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }


    public List<OrderItem> getOrderItems() {
        return orderItems;
    }

    public void setOrderItems(List<OrderItem> orderItems) {
        this.orderItems = orderItems;
    }

    public Address getAddress() {
        return address;
    }

    public void setAddress(Address address) {
        this.address = address;
    }

    public double getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public double getDiscountPrice() {
        return discountPrice;
    }

    public void setDiscountPrice(double discountPrice) {
        this.discountPrice = discountPrice;
    }

    @Override
    public String toString() {
        return "Order{" +
                "orderId='" + orderId + '\'' +
                ", orderNum='" + orderNum + '\'' +
                ", orderCreated='" + orderCreated + '\'' +
                ", userId='" + userId + '\'' +
                ", totalPrice=" + totalPrice +
                ", discountPrice=" + discountPrice +
                ", orderItems=" + orderItems +
                ", address=" + address +
                '}';
    }
}
